/**
 * @author Shine
 */

package com.shine.crypt
{
	import com.shine.utils.ClassUtil;
	
	import flash.display.Sprite;
	import flash.geom.Point;

	public class SpriteBase extends Sprite
	{
		public function SpriteBase()
		{
			super();
		}
		
		public function moveTo(x:Number, y:Number):void
		{
			this.x=x;
			this.y=y;
		}
		
		public function moveToPoint(point:Point):void
		{
			moveTo(point.x,point.y);
		}
		
		public function setSize(w:Number, h:Number):void
		{
			this.width=w;
			this.height=h;
		}
		
		public function setScale(Xscale:Number,Yscale:Number):void
		{
			this.scaleX=Xscale;
			this.scaleY=Yscale;
		}
		
		public function interactivable(enabled:Boolean=false,children:Boolean=false):void
		{
			this.mouseEnabled=enabled;
			this.mouseChildren=children;
		}
		
		override public function toString():String
		{
			return ClassUtil.toString(this,"x","y","width","height","scaleX","scaleY","rotation","parent","numChildren");
		}
		
	}
}